package com.genesis.yunnanji;

import android.support.multidex.MultiDexApplication;

import com.genesis.yunnanji.widget.GlideImageLoader;
import com.genesis.yunnanji.widget.OKHttpEngine;
import com.youth.xframe.XFrame;
import com.zhouyou.http.EasyHttp;

import org.bining.footstone.App;

public class StoreApplication extends MultiDexApplication {

    private static StoreApplication mStoreApplication;

    //声明AMapLocationClient类对象
    private StoreApplication mLocationClient = null;

    public static StoreApplication getInstance() {
        return mStoreApplication;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        XFrame.init(this);
        mStoreApplication = this;
        XFrame.initXImageLoader(new GlideImageLoader(mStoreApplication));//图片请求框架
        XFrame.initXHttp(new OKHttpEngine());//网络请求框架
        App.init(mStoreApplication);//FileUtils的初始化
        EasyHttp.init(this);//默认初始化
        EasyHttp.getInstance()
                .setBaseUrl(Constants.MAIN_ADMIN)
                .setRetryCount(0);

    }
}
